package io.github.betwowt.swagger.configuration;

import io.github.betwowt.swagger.annotation.EnableSwagger;
import io.github.betwowt.swagger.properties.SwaggerProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * swagger 自动装配
 */
@Configuration
@ConditionalOnWebApplication
@ConditionalOnProperty(prefix = SwaggerProperties.SWAGGER_PREFIX, name = SwaggerProperties.SWAGGER_RESOURCE)
@EnableConfigurationProperties(SwaggerProperties.class)
@EnableSwagger2
@EnableSwagger
public class SwaggerAutoConfiguration {

}
